﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace MangioneManagement.Models
{
	public class Customer
	{
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity), Display(Name = "ID de cliente", Order = 1)]
		public int CustomerID { get; set; }
        
		[MaxLength(255), Required, Display(Name = "Nombre", Order = 3)]
		public string FirstName { get; set; }

		[MaxLength(255), Required, Display(Name = "Apellido", Order = 4)]
		public string LastName { get; set; }

		[MaxLength(255), Required, DataType(DataType.EmailAddress), Display(Name = "E-mail", Order = 5)]
		public string Email { get; set; }

		[MaxLength(255), DataType(DataType.PhoneNumber), Display(Name = "Teléfono móvil", Order = 7)]
		public string MobilePhone { get; set; }

		[MaxLength(255), DataType(DataType.PhoneNumber), Display(Name = "Teléfono fijo", Order = 6)]
		public string Phone { get; set; }

		[MaxLength(255), Display(Name = "Provincia", Order = 9)]
		public string Province { get; set; }

		[MaxLength(255), Display(Name = "Ciudad o barrio", Order = 8)]
		public string Locality { get; set; }

		[MaxLength(255), Display(Name = "País", Order = 10)]
		public string Country { get; set; }


        public override string ToString()
        {
            return this.LastName + ", " + this.FirstName + " (" + this.MobilePhone + ")";
        }
	}
}